<meta name="csrf-token" content="{{ csrf_token() }}">
<div id="page-wrapper">
    <script type="text/javascript">
        $('#btn_submit').on('click',function(){
            $.ajaxSetup({headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},async:false});

            var request = {type:$('#type').val()};
            request.squad = $('#squad').val();
            request.start_time = $('#startTime').val();
            request.end_time = $('#endTime').val();
            request.id = $('#teacher').attr('tutor_id');
            $('tbody').empty();
            $.post('detail_submit',request,function(e){
                for(x in e.data){
                    var html = '<tr>';
                    html += '<td>'+e.data[x].name+'</td>';
                    html += '<td>'+e.data[x].type+'</td>';
                    html += '<td>'+e.data[x].event+'</td>';
                    html += '<td>'+e.data[x].status+'</td>';
                    html += '<td>'+e.data[x].time+'</td>';
                    html += '</tr>';
                    $('tbody').append(html);
                }
                $('#foot').html(e.total.start_time+'&nbsp;&nbsp;'+'~~'+'&nbsp;&nbsp;'+e.total.end_time+"&nbsp;&nbsp;合计:&nbsp;"+e.total.num+'次');
            });
        });
    </script>
</div>

<div class="box box-body">
    <table style="" class="table">
        <thead>
        <th>班级</th>
        <th>分类</th>
        <th>异常项目标识</th>
        <th>状态</th>
        <th>补完成时间</th>
        </thead>
        <tbody>
            @foreach($data as $v)
                <tr>
                    <td>{!! $v['name'] !!}</td>
                    <td>{!! $v['type'] !!}</td>
                    <td>{!! $v['event'] !!}</td>
                    <td>{!! $v['status'] !!}</td>
                    <td>{!! $v['operatetime'] !!}</td>
                </tr>
            @endforeach
        </tbody>
    </table>
    <div style="float:right;" id="foot">{!! $total['start_time'] !!}&nbsp;&nbsp;~~&nbsp;&nbsp;{!! $total['end_time'] !!}&nbsp;&nbsp;合计:&nbsp;{!! $total['num'] !!}次</div>
</div>


<script type="text/javascript">
</script>



